package com.example.demo.mapper;

import com.example.demo.entity.MinFixedInvestment;
import com.example.demo.entity.SubDistrictTownFixedInvestment;
import com.example.demo.entity.SubDistrictTownIndustrialInvestment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FixedInvestmentMapper {
    @Select("select month(statisticalTime) `month`,thisMonth,monthOnMonth,accumulate from fixed_investment where indicators = #{indicators}" +
            "and year(statisticalTime) = #{year}")
//    @Select(("select * from fixed_investment where indicators = #{indicators} and year(statisticalTime) = #{year}"))
    List<MinFixedInvestment> findFixedInvestmentByIndicators(int year, String indicators);//固投按指标
    @Select("select * from sub_district_town_fixed_investment where year(statisticalTime) = #{year} and month(statisticalTime) = #{month}")
    List<SubDistrictTownFixedInvestment> findAllSubDistrictTownFixedInvestment(int year, int month);
    @Select("select * from sub_district_town_industrial_investment where year(statisticalTime) = #{year} and month(statisticalTime) = #{month}")
    List<SubDistrictTownIndustrialInvestment> findAllSubDistrictTownIndustrialInvestment(int year, int month);
}
